package com.crazy.crazytransactionservice.controller.inner;

import com.crazy.crazymodel.model.entity.Customer;
import com.crazy.crazyserviceclient.service.TransactionFeignClient;
import com.crazy.crazytransactionservice.service.BuyService;
import com.crazy.crazytransactionservice.service.RedeemService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Date: 2024-05-07-15:25
 * @Author: Zheng Zeliang
 */
@RestController
@RequestMapping("/inner/subscribe")
@Slf4j
public class BuyInnerController {
    @Resource
    private BuyService buyService;

    /**
     * 根据 id 确认申购订单
     *
     * @param transactionId
     * @return
     */
    @PostMapping("/subscribe/confirm")

    public void confirmSubs(@RequestParam("transactionId") int transactionId) {
        buyService.confirmSubscribe(transactionId);
    }

}
